using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Script.Services;
using SiteECSWeb;
using System.Web.Services;
using System.Collections.Generic;

public partial class ExporterGuide_ExpGuideDefault : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    #region WebServiceMethod
    [WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]

    public static List<ExpoterGuideInfo> GetExpGuideItems(int pageindex, int pagesize)
    {
        ExporterGuideBLL expguideAPI = new ExporterGuideBLL();

        EcsSiteDS.ExporterGuideDataTable expgtable = expguideAPI.GetAllExporterguidData();
        List<ExpoterGuideInfo> ExpGuideInfo = new List<ExpoterGuideInfo>();
        foreach (EcsSiteDS.ExporterGuideRow expgRow in expgtable)
        {
            ExpGuideInfo.Add(new
                ExpoterGuideInfo
                (expgRow.Exporterguid_nmar, expgRow.Exporterguid_memo, expgRow.CountryNmAr,
                (expgRow.IsExporterguid_pathNull() ? string.Empty : expgRow.Exporterguid_path),
                expgRow.Exporterguid_Date));
        }
        return ExpGuideInfo.GetRange((pageindex - 1 * pagesize), pagesize);
    }
  
    #endregion
}
